﻿using NetFrame.Base;
using System;
using System.Collections.Generic;
using System.Text;

namespace NetFrame.AbsClass
{
    public abstract class AbsCoding
    {
        public abstract byte[] ModelEncoding(TransModel model);

        public abstract TransModel ModelDecoding(ref List<byte> cache);

        protected virtual byte[] ExEncode(byte[] value) {
            //nothing to do
            return value;
        }

        protected virtual byte[] ExDecode(byte[] value) {
            //nothing to do
            return value;
        }
    }
}
